<html>
<head>
<script src="/js/c9l.js"></script>
<script language=javascript>

function submit() {

	var desc = document.getElementById("desc").value;
	var sum = document.getElementById("sum").value;
	var price = document.getElementById("price").value;
	var color = document.getElementById("color").value;

	c9l.save("ads", {description:desc, summary:sum, price:price, color:color, "_keywords":c9l.keywords(desc, sum, color)});

	document.getElementById("desc").value = "";
	document.getElementById("sum").value = "";
	document.getElementById("price").value = "";
}


//publish("/test1", "hello, world");

//subscribe("/test1", 0, alert);

</script>
</head>
<body>
Post an ad!<br>
Summary: <input type=text id=sum></input><br>
<textarea id=desc rows=7 cols=40>Description</textarea><br>
Price: <input type=text id=price></input><br>
Color: <select id=color><option>red</option><option>blue</option><option>green</option></select>
<input type=submit onclick="submit()" value=POST!></input>
</body>
</html>
